package com.zerous.simplerts.screens;

import com.zerous.simplerts.*;
import android.graphics.*;
import com.zerous.simplerts.util.*;
import com.zerous.simplerts.object.*;
import com.zerous.simplerts.math.*;

public class GameScreen extends Screen
{
	Layer main;
	GameObject b;
	int i;
	public GameScreen(Game game)
	{
		super(game);
		main = new Layer();
		b = new GameObject(Arts.block);
		b.setPosition(50, 50);
		b.setVelocity(5, 5);
		b.setControler(new GameObject.Controler()
		{
			public void update(GameObject self)
			{
				self.position.add(self.velocity);
			}
		});
		
		main.addChild(b);
	}

	@Override
	public void update(float deltaTime)
	{
		i = Zef.input.getTouchType(0);
		main.update();
	}

	@Override
	public void draw()
	{
		Zef.graphics.clear(MyColor.White);
		Zef.graphics.setTextSize(32);
		Zef.graphics.drawText(i, 100, 100);
		Arts.block.draw(new Vec2(70, 70));
		main.draw();
	}
}
